<!-- My Bots -->
<!-- Author: Edwin -->
<template>
  <div class='bots-item'>
    <div class='bots-item-icon'>
      <el-image style="width: 60px; height: 60px"
                :src="itemInfo.icon"
                fit="cover">
        <div slot="error">
          <el-image src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1970007414,3972672295&fm=26&gp=0.jpg"
                    fit="cover" />
        </div>
      </el-image>
    </div>
    <div class='bots-item-tips'>
      <div class="bots-item-tips-title">{{ itemInfo.name }}</div>
      <div class="bots-item-tips-content">{{ itemInfo.description }}</div>
    </div>
    <div class='bots-item-button-group'>
      <el-button type="primary"
                 size="mini"
                 @click="emitWay('mspbots-bots-bot-store-bot-read-me')">{{ $t('custom.sys.readMe') }}</el-button>
      <el-button size="mini"
                 plain
                 @click="emitWay('mspbots-bots-bot-store-bot-console')">{{ $t('custom.sys.console') }}</el-button>
    </div>
  </div>
</template>

<script>

export default {
  props: {
    itemInfo: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data () {
    return {
    }
  },
  methods: {
    emitWay (fun) {
      this.$emit('emitWay', fun, this.itemInfo.id)
    }
  }
}
</script>

<style scoped lang="scss">
@import "src/views/modules/mspbots/bots/bot-store/bot-store";
</style>
